package cn.akaba.yun.controller;

import cn.akaba.yun.appCls.AppSql;
import cn.akaba.yun.appCls.AppTool;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.view.RedirectView;

@RestController
public class HelloController {

    @GetMapping("/hello")
    public String hello(@RequestParam(value="name", defaultValue="akabaCN") String name) {
        return "helloWorld! " + name;
    }

    @GetMapping("/install")
    public RedirectView install() {
        String sql = "";
        return AppTool.redirect("/hello");
    }
}
